package com.sg.controller.bff;

import com.sg.service.biz.bff.WorkTasksService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "WorkTasks", tags = {"WorkTasks"})
@RestController
// @RequestMapping("/oms/workTasks/")
public class WorkTasksController {

    @Autowired
    WorkTasksService workTasksService;

    /**
     * B3查询工作任务列表
     * gen by moon at 11/8/2023, 4:07:05 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskList")
    @ApiOperation(value = "B3查询工作任务列表", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskListRespDto> queryWorkTaskList(@RequestBody(required = false) @Validated BffQueryWorkTaskListReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskList(reqDTO));
    }

    /**
     * B3新增协同任务
     * gen by moon at 11/8/2023, 4:23:58 PM
     */
    @PostMapping("/oms/workTasks/addProject")
    @ApiOperation(value = "B3新增协同任务", response = OkrResult.class)
    public OkrResult<BffAddProjectRespDto> addProject(@RequestBody(required = false) @Validated BffAddProjectReqDto reqDTO) {
        return OkrResult.success(workTasksService.addProject(reqDTO));
    }

    /**
     * B3新增独立任务或子任务
     * gen by moon at 11/8/2023, 4:24:01 PM
     */
    @PostMapping("/oms/workTasks/addIndependentTask")
    @ApiOperation(value = "B3新增独立任务或子任务", response = OkrResult.class)
    public OkrResult<BffAddIndependentTaskRespDto> addIndependentTask(@RequestBody(required = false) @Validated BffAddIndependentTaskReqDto reqDTO) {
        return OkrResult.success(workTasksService.addIndependentTask(reqDTO));
    }

    /**
     * B3查询协同任务详情
     * gen by moon at 11/8/2023, 4:24:04 PM
     */
    @PostMapping("/oms/workTasks/queryProjectDetail")
    @ApiOperation(value = "B3查询协同任务详情", response = OkrResult.class)
    public OkrResult<BffQueryProjectDetailRespDto> queryProjectDetail(@RequestBody(required = false) @Validated BffQueryProjectDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryProjectDetail(reqDTO));
    }

    /**
     * B3删除协同任务(管理)
     * gen by moon at 11/8/2023, 4:24:07 PM
     */
    @PostMapping("/oms/workTasks/deleteProject")
    @ApiOperation(value = "B3删除协同任务(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteProjectRespDto> deleteProject(@RequestBody(required = false) @Validated BffDeleteProjectReqDto reqDTO) {
        return OkrResult.success(workTasksService.deleteProject(reqDTO));
    }

    /**
     * B3存档协同任务
     * gen by moon at 11/8/2023, 4:24:10 PM
     */
    @PostMapping("/oms/workTasks/archiveProject")
    @ApiOperation(value = "B3存档协同任务", response = OkrResult.class)
    public OkrResult<BffArchiveProjectRespDto> archiveProject(@RequestBody(required = false) @Validated BffArchiveProjectReqDto reqDTO) {
        return OkrResult.success(workTasksService.archiveProject(reqDTO));
    }

    /**
     * B3修改协同任务
     * gen by moon at 11/8/2023, 4:24:13 PM
     */
    @PostMapping("/oms/workTasks/updateProject")
    @ApiOperation(value = "B3修改协同任务", response = OkrResult.class)
    public OkrResult<BffUpdateProjectRespDto> updateProject(@RequestBody(required = false) @Validated BffUpdateProjectReqDto reqDTO) {
        return OkrResult.success(workTasksService.updateProject(reqDTO));
    }

    /**
     * B3修改独立任务或子任务
     * gen by moon at 11/8/2023, 4:24:16 PM
     */
    @PostMapping("/oms/workTasks/updateIndependentTask")
    @ApiOperation(value = "B3修改独立任务或子任务", response = OkrResult.class)
    public OkrResult<BffUpdateIndependentTaskRespDto> updateIndependentTask(@RequestBody(required = false) @Validated BffUpdateIndependentTaskReqDto reqDTO) {
        return OkrResult.success(workTasksService.updateIndependentTask(reqDTO));
    }

    /**
     * B3查询独立任务详情
     * gen by moon at 11/8/2023, 4:24:25 PM
     */
    @PostMapping("/oms/workTasks/queryIndependentTaskDetail")
    @ApiOperation(value = "B3查询独立任务详情", response = OkrResult.class)
    public OkrResult<BffQueryIndependentTaskDetailRespDto> queryIndependentTaskDetail(@RequestBody(required = false) @Validated BffQueryIndependentTaskDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryIndependentTaskDetail(reqDTO));
    }

    /**
     * B3删除独立任务
     * gen by moon at 11/8/2023, 4:24:28 PM
     */
    @PostMapping("/oms/workTasks/deleteIndependentTask")
    @ApiOperation(value = "B3删除独立任务", response = OkrResult.class)
    public OkrResult<BffDeleteIndependentTaskRespDto> deleteIndependentTask(@RequestBody(required = false) @Validated BffDeleteIndependentTaskReqDto reqDTO) {
        return OkrResult.success(workTasksService.deleteIndependentTask(reqDTO));
    }

    /**
     * B3存档独立任务
     * gen by moon at 11/8/2023, 4:24:31 PM
     */
    @PostMapping("/oms/workTasks/archiveIndependentTask")
    @ApiOperation(value = "B3存档独立任务", response = OkrResult.class)
    public OkrResult<BffArchiveIndependentTaskRespDto> archiveIndependentTask(@RequestBody(required = false) @Validated BffArchiveIndependentTaskReqDto reqDTO) {
        return OkrResult.success(workTasksService.archiveIndependentTask(reqDTO));
    }

    /**
     * B3-提交工作任务汇报
     * gen by moon at 11/10/2023, 4:15:43 AM
     */
    @PostMapping("/oms/workTasks/commitReportWorkTaskProgress")
    @ApiOperation(value = "B3-提交工作任务汇报", response = OkrResult.class)
    public OkrResult<BffCommitReportWorkTaskProgressRespDto> commitReportWorkTaskProgress(@RequestBody(required = false) @Validated BffCommitReportWorkTaskProgressReqDto reqDTO) {
        return OkrResult.success(workTasksService.commitReportWorkTaskProgress(reqDTO));
    }

    /**
     * B3获取高中基层工作任务场景权限
     * gen by moon at 11/12/2023, 10:21:28 PM
     */
    @PostMapping("/oms/workTasks/obtainTopMidBasicScenePower")
    @ApiOperation(value = "B3获取高中基层工作任务场景权限", response = OkrResult.class)
    public OkrResult<BffObtainTopMidBasicScenePowerRespDto> obtainTopMidBasicScenePower(@RequestBody(required = false) @Validated BffObtainTopMidBasicScenePowerReqDto reqDTO) {
        return OkrResult.success(workTasksService.obtainTopMidBasicScenePower(reqDTO));
    }

    /**
     * B3执行更新独立任务
     * gen by moon at 11/28/2023, 3:57:09 PM
     */
    @PostMapping("/oms/workTasks/implementUpdateIndependentTask")
    @ApiOperation(value = "B3执行更新独立任务", response = OkrResult.class)
    public OkrResult<BffImplementUpdateIndependentTaskRespDto> implementUpdateIndependentTask(@RequestBody(required = false) @Validated BffImplementUpdateIndependentTaskReqDto reqDTO) {
        return OkrResult.success(workTasksService.implementUpdateIndependentTask(reqDTO));
    }

    /**
     * B3执行更新协同任务
     * gen by moon at 11/28/2023, 3:57:17 PM
     */
    @PostMapping("/oms/workTasks/implementUpdateProject")
    @ApiOperation(value = "B3执行更新协同任务", response = OkrResult.class)
    public OkrResult<BffImplementUpdateProjectRespDto> implementUpdateProject(@RequestBody(required = false) @Validated BffImplementUpdateProjectReqDto reqDTO) {
        return OkrResult.success(workTasksService.implementUpdateProject(reqDTO));
    }

    /**
     * B3执行内容状态转换
     * gen by moon at 11/29/2023, 9:38:23 PM
     */
    @PostMapping("/oms/workTasks/implementContentStateConversion")
    @ApiOperation(value = "B3执行内容状态转换", response = OkrResult.class)
    public OkrResult<BffImplementContentStateConversionRespDto> implementContentStateConversion(@RequestBody(required = false) @Validated BffImplementContentStateConversionReqDto reqDTO) {
        return OkrResult.success(workTasksService.implementContentStateConversion(reqDTO));
    }

    /**
     * B3-设置工作任务分管领导
     * gen by moon at 12/2/2023, 12:36:49 AM
     */
    @PostMapping("/oms/workTasks/setWorkTaskDeptLeader")
    @ApiOperation(value = "B3-设置工作任务分管领导", response = OkrResult.class)
    public OkrResult<BffSetWorkTaskDeptLeaderRespDto> setWorkTaskDeptLeader(@RequestBody(required = false) @Validated BffSetWorkTaskDeptLeaderReqDto reqDTO) {
        return OkrResult.success(workTasksService.setWorkTaskDeptLeader(reqDTO));
    }

    /**
     * B3查询不同工作任务详情
     * gen by moon at 12/3/2023, 6:46:01 PM
     */
    @PostMapping("/oms/workTasks/queryDifferentWorkTasksDetail")
    @ApiOperation(value = "B3查询不同工作任务详情", response = OkrResult.class)
    public OkrResult<BffQueryDifferentWorkTasksDetailRespDto> queryDifferentWorkTasksDetail(@RequestBody(required = false) @Validated BffQueryDifferentWorkTasksDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryDifferentWorkTasksDetail(reqDTO));
    }

    /**
     * B3执行签收动态操作权限判断
     * gen by moon at 12/10/2023, 4:14:15 PM
     */
    @PostMapping("/oms/workTasks/implementDynamicOptPermissionJudgmentReceiptSign")
    @ApiOperation(value = "B3执行签收动态操作权限判断", response = OkrResult.class)
    public OkrResult<BffImplementDynamicOptPermissionJudgmentReceiptSignRespDto> implementDynamicOptPermissionJudgmentReceiptSign(@RequestBody(required = false) @Validated BffImplementDynamicOptPermissionJudgmentReceiptSignReqDto reqDTO) {
        return OkrResult.success(workTasksService.implementDynamicOptPermissionJudgmentReceiptSign(reqDTO));
    }

    /**
     * B3-查询工作任务来源列表（新）
     * gen by moon at 12/17/2023, 12:32:44 PM
     */
    @PostMapping("/oms/workTasks/querySourceOfWorkTaskNewList")
    @ApiOperation(value = "B3-查询工作任务来源列表（新）", response = OkrResult.class)
    public OkrResult<BffQuerySourceOfWorkTaskNewListRespDto> querySourceOfWorkTaskNewList(@RequestBody(required = false) @Validated BffQuerySourceOfWorkTaskNewListReqDto reqDTO) {
        return OkrResult.success(workTasksService.querySourceOfWorkTaskNewList(reqDTO));
    }

    /**
     * B3查工作任务管理筛选条件列表
     * gen by moon at 12/17/2023, 9:46:33 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskMgtScreenConditionList")
    @ApiOperation(value = "B3查工作任务管理筛选条件列表", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskMgtScreenConditionListRespDto> queryWorkTaskMgtScreenConditionList(@RequestBody(required = false) @Validated BffQueryWorkTaskMgtScreenConditionListReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskMgtScreenConditionList(reqDTO));
    }

    /**
     * B3执行提前开始工作任务
     * gen by moon at 1/6/2024, 7:41:34 PM
     */
    @PostMapping("/oms/workTasks/implementStartWorkTasksAheadSchedule")
    @ApiOperation(value = "B3执行提前开始工作任务", response = OkrResult.class)
    public OkrResult<BffImplementStartWorkTasksAheadScheduleRespDto> implementStartWorkTasksAheadSchedule(@RequestBody(required = false) @Validated BffImplementStartWorkTasksAheadScheduleReqDto reqDTO) {
        return OkrResult.success(workTasksService.implementStartWorkTasksAheadSchedule(reqDTO));
    }

    /**
     * B3查询工作任务详情
     * gen by moon at 1/25/2024, 8:13:05 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskDetail")
    @ApiOperation(value = "B3查询工作任务详情", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskDetailRespDto> queryWorkTaskDetail(@RequestBody(required = false) @Validated BffQueryWorkTaskDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskDetail(reqDTO));
    }

    /**
     * B3查询任务分类周期主题列表(管理)
     * gen by moon at 7/24/2024, 10:18:52 PM
     */
    @PostMapping("/oms/mgt/workTasks/queryTaskCategoriesCycleThemeList")
    @ApiOperation(value = "B3查询任务分类周期主题列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTaskCategoriesCycleThemeListRespDto> queryTaskCategoriesCycleThemeList(@RequestBody(required = false) @Validated BffQueryTaskCategoriesCycleThemeListReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryTaskCategoriesCycleThemeList(reqDTO));
    }

    /**
     * B3查询指标下对齐的工作任务列表
     * gen by moon at 8/31/2024, 8:40:40 PM
     */
    @PostMapping("/oms/workTasks/queryObjectiveAlignmentWorkTaskList")
    @ApiOperation(value = "B3查询指标下对齐的工作任务列表", response = OkrResult.class)
    public OkrResult<BffQueryObjectiveAlignmentWorkTaskListRespDto> queryObjectiveAlignmentWorkTaskList(@RequestBody(required = false) @Validated BffQueryObjectiveAlignmentWorkTaskListReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryObjectiveAlignmentWorkTaskList(reqDTO));
    }

    /**
     * B3查询工作任务单条详情
     * gen by moon at 9/14/2024, 6:47:22 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskSingleDetail")
    @ApiOperation(value = "B3查询工作任务单条详情", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskSingleDetailRespDto> queryWorkTaskSingleDetail(@RequestBody(required = false) @Validated BffQueryWorkTaskSingleDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskSingleDetail(reqDTO));
    }

    /**
     * B3查询工作任务汇报资料列表
     * gen by moon at 9/15/2024, 12:23:29 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskReportStageDataList")
    @ApiOperation(value = "B3查询工作任务汇报资料列表", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskReportStageDataListRespDto> queryWorkTaskReportStageDataList(@RequestBody(required = false) @Validated BffQueryWorkTaskReportStageDataListReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskReportStageDataList(reqDTO));
    }

    /**
     * B3查询工作任务汇报资料详情
     * gen by moon at 9/15/2024, 12:23:37 PM
     */
    @PostMapping("/oms/workTasks/queryWorkTaskReportStageDataDetail")
    @ApiOperation(value = "B3查询工作任务汇报资料详情", response = OkrResult.class)
    public OkrResult<BffQueryWorkTaskReportStageDataDetailRespDto> queryWorkTaskReportStageDataDetail(@RequestBody(required = false) @Validated BffQueryWorkTaskReportStageDataDetailReqDto reqDTO) {
        return OkrResult.success(workTasksService.queryWorkTaskReportStageDataDetail(reqDTO));
    }
}
